<template>
  <div class="tab">
    首页
    <button @click="count++">{{ count }}</button>
  </div>
</template>

<script>
export default {
  name: 'Home',

  data() {
    return {
      count: 1
    }
  },
  created() {
    console.log('Home created')
  },
  mounted() {},
  unmounted() {
    console.log('Home unmounted')
  },
  activated() {
    console.log('Home activated')
    this.timer = setInterval(() => {
      console.log('Home')
    }, 1000)
  },
  deactivated() {
    console.log('Home deactivated')
    clearInterval(this.timer)
  }
}
</script>
